<template>
  <div>
    <span>
      {{goodsName}}
      <button @click="addBtn(index)">+</button>
      {{count}}
      <button @click="reduceFn(index)">-</button>
    </span>
  </div>
</template>

<script>
export default {
  props: ['goodsName', 'count', 'index'],
  methods: {
    addBtn (index) {
      this.$emit('add', index)
    },
    reduceFn (index) {
      this.$emit('reduce', index)
    }
  }
}
</script>

<style>
</style>